#ifndef ABOS_INC_ENV_H
#define ABOS_INC_ENV_H

#include <include/types.h>
#include <include/trap.h>
#include <include/memlayout.h>

typedef int32_t pid_t;

#define NR_PROC	256			

// Values of proc_status in struct Proc 
#define PROC_FREE			0
#define PROC_RUNNABLE		1
#define PROC_NOT_RUNNABLE	2

struct Proc {
	struct Trapframe proc_tf;	// Saved registers.
	pid_t pid;				// process id.
	pid_t ppid;				// process id of it's parent.
	unsigned proc_status;		// Status of the process.
	uint32_t proc_runs;			// Number of times process has run

	// Address space
	pde_t *proc_pgdir;		// Kernel virtual address of page dir
	uintptr_t proc_cr3;		// Physical address of page dir
};

#endif // !ABOS_INC_ENV_H
